bitkeeper revision 1.344 (3f12be53t1VivuAfELH_J3XUhJ2Frg)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 14 Jul 2003 14:29:39 +0000 (14:29 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Mon, 14 Jul 2003 14:29:39 +0000 (14:29 +0000)
more console stuff

xenolinux-2.4.21-sparse/arch/xeno/defconfig
xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c
xenolinux-2.4.21-sparse/drivers/char/tty_io.c
xenolinux-2.4.21-sparse/include/asm-xeno/vga.h

index e356bce8cfab7d79d89c322cd2b097d7e471dc37..499389aaaf524e1f9d324fc8f67ddce63a50c7f3 100644 (file)
@@ -127,16 +127,33 @@ CONFIG_XENOLINUX_BLOCK=y
 # CONFIG_BLK_DEV_IDE_MODES is not set
 # CONFIG_BLK_DEV_HD is not set
 
+#
+# Console drivers
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VIDEO_SELECT is not set
+CONFIG_DUMMY_CONSOLE=y
+
+
 #
 # Character devices
 #
 CONFIG_XEN_CONSOLE=y
 CONFIG_VT=y
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_PSMOUSE is not set
+CONFIG_VT_CONSOLE=y
 # CONFIG_UNIX98_PTYS is not set
 
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+CONFIG_MOUSE=y
+CONFIG_PSMOUSE=y
+# CONFIG_82C710_MOUSE is not set
+# CONFIG_PC110_PAD is not set
+# CONFIG_MK712_MOUSE is not set
+
+
 #
 # File systems
 #
index 7ea44bd4c986204aa58422972919121d9c49b01b..e69cd2488e43485cc834254fe01de7697929652a 100644 (file)
 
 #define XENO_TTY_MINOR 123
 
+/*** useful function for console debugging -- goes straight to Xen ****/
+
+asmlinkage int xprintk(const char *fmt, ...)
+{
+        va_list args;
+        unsigned long flags;
+        int printed_len;
+        static char printk_buf[1024];
+
+        /* Emit the output into the temporary buffer */
+        va_start(args, fmt);
+        printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
+        va_end(args);
+
+        // Useful Hack if things are going wrong very early in the day
+        (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf));
+}
+
+
+
 /******************** Kernel console driver ********************************/
 
 static void xen_console_write(struct console *co, const char *s, unsigned count)
@@ -72,6 +92,7 @@ static struct console xen_console_info = {
 
 void xen_console_init(void)
 {
+  xprintk("xen_console_init\n");
   register_console(&xen_console_info);
 }
 
index ad22d9eaf70be26a54a6e3f63170f09efe131a50..5e9e3c1d983f039c1045fccbf694af336b985830 100644 (file)
@@ -2238,13 +2238,14 @@ void __init console_init(void)
        disable_early_printk(); 
 #endif
 
+#ifdef CONFIG_XEN_CONSOLE
+        xen_console_init();
+#endif
+
 #ifdef CONFIG_VT
        con_init();
 #endif
 
-#ifdef CONFIG_XEN_CONSOLE
-       xen_console_init();
-#endif
 #ifdef CONFIG_AU1000_SERIAL_CONSOLE
        au1000_serial_console_init();
 #endif
index dc49a29529caf1bf7fae93512811ef4a04efe49d..7d25414050acc9acfcf4ef63555b89392d20321d 100644 (file)
@@ -49,9 +49,7 @@ static unsigned long VGA_MAP_MEM(unsigned long x)
        return 0;
 }
 
-static inline unsigned char vga_readb(unsigned char * x) { 
-xprintk("vr %p\n",x);return (*(x)); }
-static void vga_writeb(unsigned char x, unsigned char *y) {
-xprintk("vw %02x %p\n",x,y); *(y) = (x); }
+static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); }
+static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); }
 
 #endif